﻿namespace System {

    public interface IReadOnlyF64FusionData : IReadOnlyFusionData<F64>, IReadOnlyF64Data { }
    public interface IValueChangedF64FusionData : IReadOnlyF64FusionData, IValueChangedFusionData<F64>, IValueChangedF64Data { }
    public interface IF64FusionData : IValueChangedF64FusionData, IFusionData<F64> { }

    [Implement(typeof(IReadOnlyF64FusionData))]
    [Implement(typeof(IValueChangedF64FusionData))]
    [Implement(typeof(IF64FusionData))]
    [Implement(typeof(IReadOnlyFusionData<F64>))]
    [Implement(typeof(IValueChangedFusionData<F64>))]
    [Implement(typeof(IFusionData<F64>))]
    internal sealed class KHBD_F64FusionData : KHBD_FusionData<F64>, IF64FusionData {

        protected override F64 GetDefaultValue() => default;

        protected sealed override F64 Calculate(F64 current, F64 next) => current + next;

        protected override F64 GetDefaultMaxValue() => F64.MaxValue;

        protected override F64 GetDefaultMinValue() => F64.MinValue;

        protected override F64 Clamp(F64 value, F64 min, F64 max) => F64.Clamp(value, min, max);
    }
}